import request from "@/utils/request";


export const getLogin = (info) => {
    return request({
        method: "post",
        url: "/user/login",
        data: info,
    });
};


export const deleteNewsByHid = (hid) => {
    return request({
        method: "delete",
        url: `/newline/${hid}`,
    });
};

// 添加宠物
export function addPet(data) {
    return request({
        url: '/pet/add',
        method: 'post',
        data

    })
}

// 获取宠物列表
export function getPetList() {
    return request({
        url: '/pet/list',
        method: 'get'
    })
}

// 获取宠物详情
export function getPetDetail(petId) {
    return request({
        url: `/pet/${petId}`,
        method: 'get'
    })
}

// 更新宠物信息
export function updatePet(petId, data) {
    return request({
        url: `/pet/${petId}`,
        method: 'put',
        data
    })
}